package com.keyholesoftware.trango.entity.jpa;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

import com.keyholesoftware.trango.annotations.XMLNature;
import com.keyholesoftware.trango.entity.Entity;
import com.keyholesoftware.trango.entity.Identifiable;

@MappedSuperclass
@XMLNature
public abstract class JPAEntity implements Entity, Identifiable<Serializable> {

	@Id
	@GeneratedValue(strategy = javax.persistence.GenerationType.AUTO)
	@Column(name = "ID")
	public Long identifier;

	public JPAEntity() {
		super();
	}

	@Override
	public Long getIdentifier() {
		return identifier;
	}

	public void setIdentifier(Long identifier) {
		this.identifier = identifier;
	}
}
